import { createRouter, createWebHistory } from 'vue-router'

const routes = [

  
  {
    path: '/liaojie',
    name: 'liaojie',
    component: () => import( '../views/YeMain/LiaoJie.vue'),
  },
  {
    path: '/',
    name: 'xiazai',
    component: () => import( '../views/YeMain/XiaZai.vue'),
  },
  {  
    path: '/first',
    name: 'first',
    component: () => import( '../views/First.vue'),
    children:[
      {
        path: '/yemian',
    name: 'yemian',
    component: () => import( '../views/YeMain/index.vue'),
      },
      {
        path: '/ship',
        name: 'ship',
        component: () => import( '../views/YeMain/ShiPing'),
        meta:{requireAuth:true}
      },
      {
        path: '/mobile',
        name: 'mobile',
        component: () => import( '../views/YeMain/MobileView.vue'),
        meta:{requireAuth:true}
      },
      {
        path: '/fw',
        name: 'fw',
        component: () => import( '../views/YeMain/FuwuView.vue'),
      },
      {
        path: '/computer',
        name: 'computer',
        component: () => import( '../views/YeMain/ComputerView.vue'),
      },
    ]
  },
  {
    path: '/header',
    name: 'header',
    component: () => import( '../components/HeaderView.vue'),
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/login2/LoginView.vue'),
  },
  {
    path: '/register',
    name: 'register',
    component: () => import( '../views/login2/RegisterView.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
